let pattern = new RegExp("[@#]|(\\*[12345])|([VN]?%)");

function removeSpecialCharacters(s) {
    let result = "";
    for (let i = 0; i < s.length; i++) {
        result = result + s.substr(i, 1).replace(pattern, '');
    }
    return result;
}

console.log(removeSpecialCharacters('[str@3]'));
console.log(removeSpecialCharacters('[中国V@3]'));
let matchStr = '[2323*2]';
let matchRes = matchStr.match(pattern);
console.log(matchRes, ' ', matchStr.substring(1, matchRes === null ? matchStr.length - 1 : matchRes.index));

let arr = new Array();

function arrayMap() {
    arr.push({
        id: 1,
        "name": "s1"
    });
    arr.push({
        id: 2,
        "name": "s2"
    });
    arr.push({
        id: 3,
        "name": "s3"
    });
    let resultArr = [];
    arr.forEach(item => resultArr.push(item.id))
    console.log(resultArr.join(","));
    for(let obj of resultArr) {
        console.log(obj.id);
    }
}

arrayMap();